export default {
	data() {
		return {
			list: []
		}
	},
	async onLoad(options) {
		console.log("credits index onLoad: ", options);
		await this.getMyCreditList();
	},
	async onShow() {},
	onHide() {},
	methods: {
		async getMyCreditList() {
			const getRes = await this.$uniCloudCallFunction({
				name: "xxf-credits",
				action: "getMyCreditList",
				data: {
					uid: this.$store.state.login.uid,
				}
			});
			console.log("getRes: ", getRes);
			if (getRes) {
				this.list = getRes.list;
			}
		},
	},
}